﻿Imports System
Imports System.Collections.Generic
Imports System.Collections.ObjectModel
Imports System.Drawing
Imports System.Windows.Forms

Namespace System.Workflow.ComponentModel.Design
    Public Class ActivityDragEventArgs
        Inherits DragEventArgs
        ' Methods
        Friend Sub New(ByVal dragEventArgs As DragEventArgs, ByVal dragInitiationPoint As Point, ByVal point As Point, ByVal draggedActivities As List([Of] Activity))
            MyBase.New(dragEventArgs.Data, dragEventArgs.KeyState, point.X, point.Y, dragEventArgs.AllowedEffect, dragEventArgs.Effect)
            Me.snapPoint = Point.Empty
            Me.dragInitiationPoint = Point.Empty
            Me.dragInitiationPoint = dragInitiationPoint
            If (draggedActivities Is Nothing) Then
                Me.draggedActivities = New List([Of] Activity)
            Else
                Me.draggedActivities = New List([Of] Activity)(draggedActivities)
            End If
        End Sub


        ' Properties
        Public ReadOnly Property Activities As ReadOnlyCollection([Of] Activity)
            Get
                Return Me.draggedActivities.AsReadOnly
            End Get
        End Property

        Public Property DragImageSnapPoint As Point
            Get
                Return Me.snapPoint
            End Get
            Set(ByVal value As Point)
                Me.snapPoint = value
            End Set
        End Property

        Public ReadOnly Property DragInitiationPoint As Point
            Get
                Return Me.dragInitiationPoint
            End Get
        End Property


        ' Fields
        Private draggedActivities As List([Of] Activity)
        Private dragInitiationPoint As Point
        Private snapPoint As Point
    End Class
End Namespace

